package com.example.dto.job;

import com.baomidou.mybatisplus.annotation.TableId;
import com.example.dto.base.Base;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class Job extends Base implements Serializable {

    @TableId()//value = "job_id"
    private Long id;
    //  岗位名称
    private String name;
    //  岗位排序
    private Long jobSort;
    // 是否启用
    private Boolean enabled;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Job job = (Job) o;
        return Objects.equals(id, job.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}